﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="DefaultContent1.ascx.cs" Inherits="Sites_Vigor_Webparts_Pages_DefaultContent1" %>
<%@ Register Src="../Common/RightNews.ascx" TagName="RightNews" TagPrefix="uc3" %>
<%@ Register Src="../Common/RightAds.ascx" TagName="RightAds" TagPrefix="uc4" %>
<%@ Register Src="../Common/RightWorkingTime.ascx" TagName="RightWorkingTime" TagPrefix="uc1" %>
<%@ Register Src="../Common/RightVideo.ascx" TagName="RightVideo" TagPrefix="uc2" %>
<%@ Import Namespace="NTTHAO.CommonWeb" %>
<%@ Import Namespace="NTTHAO.Web.BL.CommonPage" %>
<div class="wrapper">
    <div style="clear: both;">
        <div class="bd-right">
            <uc1:RightWorkingTime ID="RightWorkingTime1" runat="server" />
            <uc2:RightVideo ID="RightVideo1" runat="server" />
            <uc3:RightNews ID="RightNews1" runat="server" />
            <uc4:RightAds ID="RightAds1" runat="server" />
        </div>
        <div class="bd-left">
            <div class="left-block">
                <div class="block-wrapper">
                    <h2 class="cat-title"><%=Server.HtmlEncode(_RootMenu.Text) %></h2>
                    <div class="block-text-wrapper">
                        <div class="menu-path">
                            <div class="path-wrapper"><%
        //string urlPath = "/" + _Group.URLName + "/";
        for (int i = 0; i < _MenuPath.Count; i++) 
        {
            //urlPath += _MenuPath[i].URLText + "/";
    %><%if (i > 0) { %><span class="sepa"></span><%} %><span><%=Server.HtmlEncode(_MenuPath[i].Text)%></span><%
        } %></div>
                        </div>
                        <div class="line"></div>
                        <div class="sub-menu-list">
                            <div class="list-wrapper"><%
    try
    {
        CommonGroupTree tree = CommonPageGroup.GetTree(this._Group.ID);
        CommonMenuNode node = tree.GetNode(_CurrentMenu.ParentID);
        if (node != null && node.Children != null )
        {
            string urlRoot = "/" + this._Group.URLName + "/" + node.Menu.URLText + "/";
            node = node.Children[0];
            while (node != null)
            {
                %>
            <a href="<%=urlRoot + node.Menu.URLText + "/" %>" class="item <%=node.Menu.ID == _CurrentMenu.ID ? "active" : "" %>"><%=Server.HtmlEncode(node.Menu.Text) %></a><%
                node = node.NextNode;
            }
        }
    }
    catch { }
%>
                            </div>
                        </div>
                        <div class="line"></div><%
                    if (this._Content != null) {%>
                        <div class="page-content">
                            <h1 class="content-title"><%=Server.HtmlEncode(_Content.Header) %></h1>
                            <div class="rel oh date-line">
                                <span class="date">Ngày đăng: <%=_Content.InsertDate.ToString("dd/MM/yyyy") %></span>
                                <span class="social-group">
                                    <a class="fb" target="_blank" href="http://www.facebook.com/sharer.php?u=<%=Server.UrlEncode("http://" + Request.Url.Host + (Request.Url.Port == 80 ? "" : (":"+Request.Url.Port.ToString())) + Request.RawUrl) %>" title="Chia sẻ với bạn bè trên Facebook"></a>
                                    <a class="tw" target="_blank" href="http://twitter.com/share?text=<%=Server.UrlEncode(this._Content.Header) %>&url=<%=Server.UrlEncode("http://" + Request.Url.Host + (Request.Url.Port == 80 ? "" : (":"+Request.Url.Port.ToString())) + Request.RawUrl) %>" title="Chia sẻ với bạn bè trên Tweet"></a>
                                    <a class="gp" target="_blank" href="#"></a>
                                    <a class="print" href="#" onclick="window.print(); return false;"></a>
                                    <a class="email" href="mailto:?subject=<%=Server.HtmlEncode(this._Content.Header) %>&body=<%=Server.HtmlEncode("http://" + Request.Url.Host + (Request.Url.Port == 80 ? "" : (":"+Request.Url.Port.ToString())) + Request.RawUrl) %>" title="Chia sẻ với bạn bè qua email"></a>
                                </span>
                            </div>
                            <div class="content-detail">
                                <%=this._Content.Content %>
                            </div>
                        </div>
                    <%
                    } %>
                    </div>
                </div>
            </div>
            <div class="clearfix"></div>
        </div>
    </div>
</div>